package com.example.springdemo.domain.factory_bean;

import com.example.springdemo.domain.User;
import org.springframework.beans.factory.FactoryBean;

//@Component("customBean")
public class CustomBean implements FactoryBean<User> {
    @Override
    public User getObject() throws Exception {
        return new User("kk-student", 23);
    }

    @Override
    public Class<?> getObjectType() {
        return User.class;
    }

    @Override
    public boolean isSingleton() {
        return FactoryBean.super.isSingleton();
    }
}
